package com.xiaodu.acer.phoneplay.ui.fragment;

import android.support.v7.widget.RecyclerView;

import com.xiaodu.acer.phoneplay.bean.downloadbean.DownloadMission;
import com.xiaodu.acer.phoneplay.ui.adapter.DownloadingAdapter;

import java.util.List;


/**
 * 下载页面
 */
public class DownloadingFragment extends AppManagerFragment {

    private DownloadingAdapter mAdapter;

    @Override
    public void init() {
        //得保留super
        super.init();
        //获取正在下载的apk
        mPresenter.getDownLoadingApps();
    }

    @Override
    protected RecyclerView.Adapter setupAdapter() {
        mAdapter = new DownloadingAdapter(mPresenter.getRetrofit());
        return mAdapter;
    }


    @Override
    public void showDownloading(List<DownloadMission> downloadMissions) {
        mAdapter.addData(downloadMissions);
    }
}
